package Student

import "fmt"

type student struct {
	name string
	age  int
	tele string
}

// 工厂模式
func NewStudentInfo(_name string, _age int, _tele string) *student {
	return &student{
		name: _name,
		age:  _age,
		tele: _tele,
	}
}

func (s student) PrintInfo() {
	fmt.Printf("姓名：%v, 年龄：%v, 电话号码：%v", s.name, s.age, s.tele)
	fmt.Println()
}

func (s student) GetName() string {
	return s.name
}
func (s student) GetAge() int {
	return s.age
}
func (s student) GetTele() string {
	return s.tele
}

func (s *student) SetName(_name string) {
	s.name = _name
}
func (s *student) SetAge(_age int) {
	s.age = _age
}
func (s *student) SetTele(_tele string) {
	s.tele = _tele
}
